package Y2024.M12.D5;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 25228
 * Date: 2024-12-05
 * Time: 8:07
 */
public class Main {
    public static void main(String[] args) {
        Thread thread1=new Thread(new PrintNumberTask1("q",1));
        Thread thread2=new Thread(new PrintNumberTask2("w",2));
        Thread thread3=new Thread(new PrintNumberTask3("e",3));
        Thread thread4=new Thread(new PrintNumberTask4("r",4));
        Thread thread5=new Thread(new PrintNumberTask5("t",5));
        thread1.start();
        thread2.start();
        thread3.start();
        thread4.start();
        thread5.start();
    }
}
class PrintNumberTask1 implements Runnable{
    String name;
    int number;
    PrintNumberTask1(String name,int number){
        this.name=name;
        this.number=number;
    }
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(name+":"+number);
        }
    }
}
class PrintNumberTask2 implements Runnable{
    String name;
    int number;
    PrintNumberTask2(String name,int number){
        this.name=name;
        this.number=number;
    }
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(name+":"+number);
        }
    }
}
class PrintNumberTask3 implements Runnable{
    String name;
    int number;
    PrintNumberTask3(String name,int number){
        this.name=name;
        this.number=number;
    }
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(name+":"+number);
        }
    }
}
class PrintNumberTask4 implements Runnable{
    String name;
    int number;
    PrintNumberTask4(String name,int number){
        this.name=name;
        this.number=number;
    }
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(name+":"+number);
        }
    }
}
class PrintNumberTask5 implements Runnable{
    String name;
    int number;
    PrintNumberTask5(String name,int number){
        this.name=name;
        this.number=number;
    }
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(name+":"+number);
        }
    }
}